package saxion.speelveld.spaceengineer.buildings;

import saxion.speelveld.spaceengineer.R;
import saxion.speelveld.spaceengineer.model.ProducingBuilding;
import saxion.speelveld.spaceengineer.model.Resource;
import saxion.speelveld.spaceengineer.model.ResourceType;

public class OreRefinery extends ProducingBuilding
{

	public OreRefinery()
	{
		super(2, 3);
		super.setBuildingName(OreRefinery.this.getClass().getSimpleName());
		super.setBuildingExplanation("The Ore Rifinery combines/smelts ores to make actual useable metal items.");
		super.resourceCosts.add(new Resource(ResourceType.MONEY, 250));
		super.resourceCosts.add(new Resource(ResourceType.ELECTRICITY, 15));
		super.resourceCosts.add(new Resource(ResourceType.WATER, 75));
		super.resourceCosts.add(new Resource(ResourceType.METAL, 200));

		// voorbeeld
		super.addPossibleResourceProducement(new Resource(ResourceType.GLASS, 2, true), new Resource(ResourceType.SAND,
			4, true));
		super.addPossibleResourceProducement(new Resource(ResourceType.METAL, 2, true), new Resource(
			ResourceType.IRONORE, 4, true));
		super.addPossibleResourceProducement(new Resource(ResourceType.GOLD, 1, true), new Resource(
			ResourceType.GOLDORE, 3, true));

		super.addResourceProduceGain(new Resource(ResourceType.METAL, 1, true));
		super.addResourceProduceCost(new Resource(ResourceType.IRONORE, 1, true));
		super.addResourceProduceCost(new Resource(ResourceType.HAPPINESS, 1, false));
		// Mitchell's idee:
		/**
		 * super.setResourcesProduced(ResourceType.IRON); super.setResourcesProduced(ResourceType.HAPPINESS);
		 * 
		 * if (super.getResourcesProduced() == ResourceType.IRON) { super.setProductioncapacity(1); }
		 * 
		 * if (super.getResourcesProduced() == ResourceType.HAPPINESS) { super.setProductioncapacity(-1); }
		 */

		super.resourceImages = new int[6];
		super.resourceImages[0] = R.drawable.orerefinery_0;
		super.resourceImages[1] = R.drawable.orerefinery_1;
		super.resourceImages[2] = R.drawable.orerefinery_2;
		super.resourceImages[3] = R.drawable.orerefinery_3;
		super.resourceImages[4] = R.drawable.orerefinery_4;
		super.resourceImages[5] = R.drawable.orerefinery_5;
		super.setPreviewResourceImageId(R.drawable.orerefinery);
	}

	// @Override
	// public int produceGoods()
	// {
	// return 0;
	// }

}
